const app = getApp();
Component({
  data: {
    selected: 0,
	unread:0,
	hidden:false,
    color: "#7A7E83",
    selectedColor: "#3cc51f",
    "list": [{
    		"selectedIconPath": "static/imgs/tarbar/index-c.png",
    		"iconPath": "static/imgs/tarbar/index.png",
    		"pagePath": "/pages/index/index",
    		"text": "首页"
    	}, {
    		"selectedIconPath": "static/imgs/tarbar/safair-c.png",
    		"iconPath": "static/imgs/tarbar/safair.png",
    		"pagePath": "/pages/index/ask",
    		"text": "问答"
    	},
    	{
    		"selectedIconPath": "static/imgs/tarbar/push-c.png",
    		"iconPath": "static/imgs/tarbar/push.png",
    		"pagePath": "/pages/post/post",
    		"text": "发帖"
    	}, {
    		"selectedIconPath": "static/imgs/tarbar/sms-c.png",
    		"iconPath": "static/imgs/tarbar/sms.png",
    		"pagePath": "/pages/message/index",
    		"text": "消息"
    	}, {
    		"selectedIconPath": "static/imgs/tarbar/my-c.png",
    		"iconPath": "static/imgs/tarbar/my.png",
    		"pagePath": "/pages/person/my",
    		"text": "我的"
    	}
    ]
  },
  methods: {
    switchTab(e) {
      const dataset = e.currentTarget.dataset
      const path = dataset.url
	 
        wx.switchTab({
          url: path
        })
       
    }
  }
})